# Contributor: Dmitry Romanenko <dmitry@romanenko.in>
# Maintainer: Dmitry Romanenko <dmitry@romanenko.in>
pkgname=py3-filelock
_pkgname=filelock
pkgver=3.4.2
pkgrel=0
pkgdesc="A platform independent file lock for Python3"
url="https://github.com/benediktschmitt/py-filelock"
arch="noarch"
license="Unlicense"
depends="python3"
checkdepends="py3-pytest py3-pytest-timeout"
makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/f/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces="py-filelock" # Backwards compatibility
provides="py-filelock=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH=$PWD/src python3 -m pytest -xvv ./tests/test_filelock.py
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
0244058588029ae739a71d8cdc9f7f5003af2c829e74c67a144fcbba847153afe6d0f4edee11f6111dd47a0d6826e3aebabd95e9d075457bf50059ca06e0cce4  filelock-3.4.2.tar.gz
"
